home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 262 / SOMC Family Forum 262.iso / Xtras / ScriptOMatic Lite.Dxr / 00004_PopMenu Event Manager.ls < prev    next >
Encoding:
Text File  |  1997-04-30  |  864 b   |  23 lines

  1. global gScriptOMaticCurrentFormatTable
  2.  
  3. on mouseDown
  4.   set clickedMemberNum to member the memberNum of sprite the clickOn
  5.   set newSelection to the selectedText of clickedMemberNum
  6.   if newSelection <> EMPTY then
  7.     set clickedMemberName to the name of clickedMemberNum
  8.     set mediaID to value(the last char in clickedMemberName)
  9.     delete char -30000 of clickedMemberName
  10.     repeat with elementIndex = 1 to count(gScriptOMaticCurrentFormatTable)
  11.       set elementData to getAt(gScriptOMaticCurrentFormatTable, elementIndex)
  12.       if the id of elementData = mediaID then
  13.         if not (newSelection starts "Custom") then
  14.           setaProp(elementData, symbol(clickedMemberName), newSelection)
  15.           setAt(gScriptOMaticCurrentFormatTable, elementIndex, elementData)
  16.         else
  17.         end if
  18.         exit repeat
  19.       end if
  20.     end repeat
  21.   end if
  22. end
  23.